import 'dart:core';

class LikedNews {
  String newsId;
  String time;
  String source;
  String type;
  String title;
  String headerImage;
  String content;
  String likeTime;

  LikedNews(
    this.newsId,
    this.time,
    this.source,
    this.type,
    this.title,
    this.headerImage,
    this.content,
    this.likeTime,
  );

  static LikedNews fromMap(Map<String, dynamic> map) {
    return LikedNews(
        map['newsId'].toString(),
        map['time'].toString().substring(0, 10),
        map['source'],
        map['type'],
        map['title'],
        map['headerImage'],
        map['content'],
        map['likeTime']);
  }
}
